import Vue from 'vue'
import Vuex from 'vuex'
import users from './modules/users'
import token from './modules/token'
import msg from './modules/msg'
import systems from './modules/systems'
import roles from './modules/roles'
import permissions from './modules/permissions'

import vuexRouterInterceptor from '../plugin/vuex-router-interceptor'

Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    users,
    token,
    msg,
    systems,
    roles,
    permissions
  },
  plugins: [vuexRouterInterceptor()]
})
